<cfcomponent displayname="grantApplication" >
	<cffunction name="hasAccessToApp" returntype="string">
		<cfargument name="columnInterest" >
		<cfargument name="tableOfInterest" >
		<cfargument name="appName" >
		<cfargument name="useridColumn" >
		
		<cfquery name="hasAccess" datasource="#session.global_dsn#" >
			SELECT #columnInterest#
			  FROM EGRGUSERAPPS
			 WHERE #columnInterest# = '#appName#' AND #useridColumn# = '#session.userid#';	
		</cfquery>
		
		<cfif hasAccess.recordCount gt 0 >
			<cfreturn 'true' >
		<cfelse>
			<cfreturn 'false' >
		</cfif>	
	</cffunction>
</cfcomponent>